//
//  RightViewController.m
//  Leisure
//
//  Created by xalo on 16/6/28.
//  Copyright © 2016年 蓝鸥科技有限公司西安分公司. All rights reserved.
//

#import "RightViewController.h"

@interface RightViewController ()

@end

@implementation RightViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
    
    
//    self.view.backgroundColor = [UIColor yellowColor];

//创建BarButton
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"菜单" style:UIBarButtonItemStylePlain target:self action:@selector(itemAction)];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//事件
-(void)itemAction{
    if (!self.isSlider) {
    [UIView animateWithDuration:0.2 animations:^{
        //向右偏移
        self.navigationController.view.frame = CGRectMake(kWidth/4*3, 0, kWidth, kHeight+64);
    }];
    }else{
     [UIView animateWithDuration:0.2 animations:^{
         self.navigationController.view.frame = CGRectMake(0, 0, kWidth, kHeight+64);
     }];
    }
    self.isSlider = !self.isSlider;
}

@end
